package io.renren.modules.study.entity;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class StudyBaseSubject {
    private Long id;
    private String name;
    private List<Event> events;

    public void addEvent(Event event) {
        if (events == null) {
            events = new ArrayList<>();
        }
        events.add(event);
    }

    public void removeEvent(Event event) {
        if (events != null) {
            events.remove(event);
        }
    }
}
